package com.raimcomputing.pickforme.common.vo.impl;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import com.raimcomputing.pickforme.common.vo.UserVo;

/**
 * Implements the UserVo concept. This class is expected to be persisted via the
 * javax.persistence annotations.
 * 
 */
@Entity
public class UserVoImpl implements UserVo {
	static final long serialVersionUID = 1;
	
	private byte[] digest;
	private String email;
	private Long id;
	private String salt;

	@Column(nullable = false, length = 50)
	public byte[] getDigest() {
		return (digest);
	}

	@Column(unique = true, nullable = false, length = 100)
	public String getEmail() {
		return (email);
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getId() {
		return (id);
	}

	@Column(nullable = false, length = 10)
	public String getSalt() {
		return (salt);
	}

	public void setDigest( byte[] digest ) {
		this.digest = digest;
	}

	public void setEmail( String email ) {
		this.email = email;
	}

	public void setId( Long id ) {
		this.id = id;
	}

	public void setSalt( String salt ) {
		this.salt = salt;
	}

}
